﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<div id="header">
    <div class="div1"><img src="/admin/content/images/logo.png" title="Administration" onclick="location = '#'"></div>
    <% if((int)ViewData["isLogin"]==1){  %>
        <div class="div2"><img src="/admin/content/images/lock.png" alt="" style="position: relative; top: 3px;">&nbsp;Đăng nhập với tài khoản <span><%= Html.Encode(ViewData["user_name"]) %></span></div>
    <%} %>
 </div>
  <% if((int)ViewData["isLogin"]==1){  %>
<div id="menu">
  <ul class="nav left sf-js-enabled" style="display: block;">
    <li id="home"><a href="/admin/home" class="top">Trang Chủ</a></li>
   
    <li id="user"><a class="top">Quản Lý User</a>
      <ul style="display: none; visibility: hidden;">
        <li><a href="/admin/account/edituser">Chỉnh Sửa Thông Tin</a></li>
        <li><a href="/admin/account/changepassword">Đổi Mật Khẩu</a></li>
        <li><a href="/admin/account/listuser">Quản Lý User</a></li>
      </ul>
    </li>
    
    <li id="book"><a class="top">Quản Lý Sách</a>
      <ul style="display: none; visibility: hidden;">
        <li><a href="/admin/category/index">Quản Lý Danh Mục</a></li>
        <li><a href="/admin/book/index">Quản Lý Sách</a></li>
        <li><a href="/admin/comment/index">Quản Lý Comment</a></li>
      </ul>
    </li>
    <li id="cart"><a class="top">Quản Lý Đơn Hàng</a>
      <ul style="display: none; visibility: hidden;">
        <li><a href="/admin/bill/index">Quản Lý Đơn Hàng Mua</a></li>
        <li><a href="/admin/billrent/index">Quản Lý Đơn Hàng Thuê</a></li>
      </ul>
    </li>
  </ul>
  <ul style="display: block;" class="nav right sf-js-enabled">
    <li class="" id="store"><a onclick="window.open('/home/index');" class="top">Trang Ngoài</a>
      <ul style="display: none; visibility: hidden;">
              </ul>
    </li>
    <li id="store"><a class="top" href="/admin/login/logout">Thoát</a></li>
  </ul>
  <script type="text/javascript"><!--
$(document).ready(function() {
	$('.nav').superfish({
		hoverClass	 : 'sfHover',
		pathClass	 : 'overideThisToUse',
		delay		 : 0,
		animation	 : {height: 'show'},
		speed		 : 'normal',
		autoArrows   : false,
		dropShadows  : false, 
		disableHI	 : false, /* set to true to disable hoverIntent detection */
		onInit		 : function(){},
		onBeforeShow : function(){},
		onShow		 : function(){},
		onHide		 : function(){}
	});
	
	$('.nav').css('display', 'block');
});
//--></script>
  <script type="text/javascript"><!--
      function getURLVar(urlVarName) {
        
	var urlHalves = String(document.location).toLowerCase().split(':');
	var urlVarValue = '';
	if (urlHalves[2]) {
		var urlVars = urlHalves[2].split('/');
		urlVarValue = urlVars[2];
	}
	
	return urlVarValue;
}

$(document).ready(function() {
    route = getURLVar('route');
    var temp = route.split('?');
    if (temp[1] != "") {
        route = temp[0];
    }
    if (route == "billdetail") {
        route = "bill";
    }
    if (route == "billrentdetail") {
        route = "billrent";
    }
    if (route == "home") {
        $('#home').addClass('selected');
    } else {
        part = route.split('/');

        url = part[0];

        if (part[1]) {
            url += '/' + part[1];
        }

        $('a[href*=\'' + url + '\']').parents('li[id]').addClass('selected');
    }
});  
//--></script>
</div>
  <%} %>